package cn.nbt.busManage.dao.mapper;

import cn.nbt.busManage.model.entity.Point;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Lazy;

import java.util.List;

/**
 * {@code @Author} lyq
 * {@code @Date} 6/12/2024 10:47 PM
 */
@Mapper
public interface PointMapper {
    /**
     * 根据信息查询站点
     * @param query 查询信息（名称或id）
     * @return 站点信息
     */
    @Select("select * from point where point.point_name like '%${query}%' or cast(point.id as varchar) like '%${query}%'")
    List<Point> findByQuery(String query);
}
